package com.example.test.dialogfactory;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import easier.app.x.view.DragMoveTouchListener;

public class MainActivity37 extends AppCompatActivity {

    public static void start( Context context ) {

        Intent starter = new Intent( context, MainActivity37.class );
        context.startActivity( starter );
    }

    @Override
    protected void onCreate( Bundle savedInstanceState ) {

        super.onCreate( savedInstanceState );
        setContentView( R.layout.activity_main37 );
        initView();
    }

    private void initView() {

        View floatFrame = findViewById( R.id.floatFrame );
        floatFrame.setOnTouchListener( new DragMoveTouchListener( floatFrame ) );
        floatFrame.setOnClickListener( new OnClickListener() {
            @Override
            public void onClick( View v ) {

                Toast.makeText( v.getContext(), "clicked", Toast.LENGTH_SHORT ).show();
            }
        } );
    }
}